import React from 'react';
import { BrowserRouter as Router , Route , Switch } from 'react-router-dom';
import Home from './pages/Home';
import Login from './pages/Login';
import AuthRoute from './components/AuthRoute';

const App = () => {
    return (
        <Router>
            <Switch>
                <Route path='/login' component={Login} />
                <AuthRoute exact path='/' component={Home} />
                <Route component={() => <h1>不存在的页面！</h1>} />
            </Switch>
        </Router>
    )
};

export default App;